{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "649"
      ]
     },
     "execution_count": 1,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# load dataset (student Portuguese scores)\n",
    "import pandas as pd\n",
    "d = pd.read_csv('student-por.csv', sep=';')\n",
    "len(d)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style>\n",
       "    .dataframe thead tr:only-child th {\n",
       "        text-align: right;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: left;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>school</th>\n",
       "      <th>sex</th>\n",
       "      <th>age</th>\n",
       "      <th>address</th>\n",
       "      <th>famsize</th>\n",
       "      <th>Pstatus</th>\n",
       "      <th>Medu</th>\n",
       "      <th>Fedu</th>\n",
       "      <th>Mjob</th>\n",
       "      <th>Fjob</th>\n",
       "      <th>...</th>\n",
       "      <th>internet</th>\n",
       "      <th>romantic</th>\n",
       "      <th>famrel</th>\n",
       "      <th>freetime</th>\n",
       "      <th>goout</th>\n",
       "      <th>Dalc</th>\n",
       "      <th>Walc</th>\n",
       "      <th>health</th>\n",
       "      <th>absences</th>\n",
       "      <th>pass</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>GP</td>\n",
       "      <td>F</td>\n",
       "      <td>18</td>\n",
       "      <td>U</td>\n",
       "      <td>GT3</td>\n",
       "      <td>A</td>\n",
       "      <td>4</td>\n",
       "      <td>4</td>\n",
       "      <td>at_home</td>\n",
       "      <td>teacher</td>\n",
       "      <td>...</td>\n",
       "      <td>no</td>\n",
       "      <td>no</td>\n",
       "      <td>4</td>\n",
       "      <td>3</td>\n",
       "      <td>4</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>3</td>\n",
       "      <td>4</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>GP</td>\n",
       "      <td>F</td>\n",
       "      <td>17</td>\n",
       "      <td>U</td>\n",
       "      <td>GT3</td>\n",
       "      <td>T</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>at_home</td>\n",
       "      <td>other</td>\n",
       "      <td>...</td>\n",
       "      <td>yes</td>\n",
       "      <td>no</td>\n",
       "      <td>5</td>\n",
       "      <td>3</td>\n",
       "      <td>3</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>3</td>\n",
       "      <td>2</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>GP</td>\n",
       "      <td>F</td>\n",
       "      <td>15</td>\n",
       "      <td>U</td>\n",
       "      <td>LE3</td>\n",
       "      <td>T</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>at_home</td>\n",
       "      <td>other</td>\n",
       "      <td>...</td>\n",
       "      <td>yes</td>\n",
       "      <td>no</td>\n",
       "      <td>4</td>\n",
       "      <td>3</td>\n",
       "      <td>2</td>\n",
       "      <td>2</td>\n",
       "      <td>3</td>\n",
       "      <td>3</td>\n",
       "      <td>6</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>GP</td>\n",
       "      <td>F</td>\n",
       "      <td>15</td>\n",
       "      <td>U</td>\n",
       "      <td>GT3</td>\n",
       "      <td>T</td>\n",
       "      <td>4</td>\n",
       "      <td>2</td>\n",
       "      <td>health</td>\n",
       "      <td>services</td>\n",
       "      <td>...</td>\n",
       "      <td>yes</td>\n",
       "      <td>yes</td>\n",
       "      <td>3</td>\n",
       "      <td>2</td>\n",
       "      <td>2</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>5</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>GP</td>\n",
       "      <td>F</td>\n",
       "      <td>16</td>\n",
       "      <td>U</td>\n",
       "      <td>GT3</td>\n",
       "      <td>T</td>\n",
       "      <td>3</td>\n",
       "      <td>3</td>\n",
       "      <td>other</td>\n",
       "      <td>other</td>\n",
       "      <td>...</td>\n",
       "      <td>no</td>\n",
       "      <td>no</td>\n",
       "      <td>4</td>\n",
       "      <td>3</td>\n",
       "      <td>2</td>\n",
       "      <td>1</td>\n",
       "      <td>2</td>\n",
       "      <td>5</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>5 rows × 31 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "  school sex  age address famsize Pstatus  Medu  Fedu     Mjob      Fjob ...   \\\n",
       "0     GP   F   18       U     GT3       A     4     4  at_home   teacher ...    \n",
       "1     GP   F   17       U     GT3       T     1     1  at_home     other ...    \n",
       "2     GP   F   15       U     LE3       T     1     1  at_home     other ...    \n",
       "3     GP   F   15       U     GT3       T     4     2   health  services ...    \n",
       "4     GP   F   16       U     GT3       T     3     3    other     other ...    \n",
       "\n",
       "  internet romantic  famrel  freetime  goout Dalc Walc health absences pass  \n",
       "0       no       no       4         3      4    1    1      3        4    0  \n",
       "1      yes       no       5         3      3    1    1      3        2    0  \n",
       "2      yes       no       4         3      2    2    3      3        6    1  \n",
       "3      yes      yes       3         2      2    1    1      5        0    1  \n",
       "4       no       no       4         3      2    1    2      5        0    1  \n",
       "\n",
       "[5 rows x 31 columns]"
      ]
     },
     "execution_count": 2,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# generate binary label (pass/fail) based on G1+G2+G3 (test grades, each 0-20 pts); threshold for passing is sum>=30\n",
    "d['pass'] = d.apply(lambda row: 1 if (row['G1']+row['G2']+row['G3']) >= 35 else 0, axis=1)\n",
    "d = d.drop(['G1', 'G2', 'G3'], axis=1)\n",
    "d.head()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style>\n",
       "    .dataframe thead tr:only-child th {\n",
       "        text-align: right;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: left;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>age</th>\n",
       "      <th>Medu</th>\n",
       "      <th>Fedu</th>\n",
       "      <th>traveltime</th>\n",
       "      <th>studytime</th>\n",
       "      <th>failures</th>\n",
       "      <th>famrel</th>\n",
       "      <th>freetime</th>\n",
       "      <th>goout</th>\n",
       "      <th>Dalc</th>\n",
       "      <th>...</th>\n",
       "      <th>activities_no</th>\n",
       "      <th>activities_yes</th>\n",
       "      <th>nursery_no</th>\n",
       "      <th>nursery_yes</th>\n",
       "      <th>higher_no</th>\n",
       "      <th>higher_yes</th>\n",
       "      <th>internet_no</th>\n",
       "      <th>internet_yes</th>\n",
       "      <th>romantic_no</th>\n",
       "      <th>romantic_yes</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>18</td>\n",
       "      <td>4</td>\n",
       "      <td>4</td>\n",
       "      <td>2</td>\n",
       "      <td>2</td>\n",
       "      <td>0</td>\n",
       "      <td>4</td>\n",
       "      <td>3</td>\n",
       "      <td>4</td>\n",
       "      <td>1</td>\n",
       "      <td>...</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>17</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>2</td>\n",
       "      <td>0</td>\n",
       "      <td>5</td>\n",
       "      <td>3</td>\n",
       "      <td>3</td>\n",
       "      <td>1</td>\n",
       "      <td>...</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>15</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>2</td>\n",
       "      <td>0</td>\n",
       "      <td>4</td>\n",
       "      <td>3</td>\n",
       "      <td>2</td>\n",
       "      <td>2</td>\n",
       "      <td>...</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>15</td>\n",
       "      <td>4</td>\n",
       "      <td>2</td>\n",
       "      <td>1</td>\n",
       "      <td>3</td>\n",
       "      <td>0</td>\n",
       "      <td>3</td>\n",
       "      <td>2</td>\n",
       "      <td>2</td>\n",
       "      <td>1</td>\n",
       "      <td>...</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>16</td>\n",
       "      <td>3</td>\n",
       "      <td>3</td>\n",
       "      <td>1</td>\n",
       "      <td>2</td>\n",
       "      <td>0</td>\n",
       "      <td>4</td>\n",
       "      <td>3</td>\n",
       "      <td>2</td>\n",
       "      <td>1</td>\n",
       "      <td>...</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>5 rows × 57 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "   age  Medu  Fedu  traveltime  studytime  failures  famrel  freetime  goout  \\\n",
       "0   18     4     4           2          2         0       4         3      4   \n",
       "1   17     1     1           1          2         0       5         3      3   \n",
       "2   15     1     1           1          2         0       4         3      2   \n",
       "3   15     4     2           1          3         0       3         2      2   \n",
       "4   16     3     3           1          2         0       4         3      2   \n",
       "\n",
       "   Dalc      ...       activities_no  activities_yes  nursery_no  nursery_yes  \\\n",
       "0     1      ...                   1               0           0            1   \n",
       "1     1      ...                   1               0           1            0   \n",
       "2     2      ...                   1               0           0            1   \n",
       "3     1      ...                   0               1           0            1   \n",
       "4     1      ...                   1               0           0            1   \n",
       "\n",
       "   higher_no  higher_yes  internet_no  internet_yes  romantic_no  romantic_yes  \n",
       "0          0           1            1             0            1             0  \n",
       "1          0           1            0             1            1             0  \n",
       "2          0           1            0             1            1             0  \n",
       "3          0           1            0             1            0             1  \n",
       "4          0           1            1             0            1             0  \n",
       "\n",
       "[5 rows x 57 columns]"
      ]
     },
     "execution_count": 3,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# use one-hot encoding on categorical columns\n",
    "d = pd.get_dummies(d, columns=['sex', 'school', 'address', 'famsize', 'Pstatus', 'Mjob', 'Fjob', \n",
    "                               'reason', 'guardian', 'schoolsup', 'famsup', 'paid', 'activities',\n",
    "                               'nursery', 'higher', 'internet', 'romantic'])\n",
    "d.head()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Passing: 328 out of 649 (50.54%)\n"
     ]
    }
   ],
   "source": [
    "# shuffle rows\n",
    "d = d.sample(frac=1)\n",
    "# split training and testing data\n",
    "d_train = d[:500]\n",
    "d_test = d[500:]\n",
    "\n",
    "d_train_att = d_train.drop(['pass'], axis=1)\n",
    "d_train_pass = d_train['pass']\n",
    "\n",
    "d_test_att = d_test.drop(['pass'], axis=1)\n",
    "d_test_pass = d_test['pass']\n",
    "\n",
    "d_att = d.drop(['pass'], axis=1)\n",
    "d_pass = d['pass']\n",
    "\n",
    "# number of passing students in whole dataset:\n",
    "import numpy as np\n",
    "print(\"Passing: %d out of %d (%.2f%%)\" % (np.sum(d_pass), len(d_pass), 100*float(np.sum(d_pass)) / len(d_pass)))"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "metadata": {},
   "outputs": [],
   "source": [
    "# fit a decision tree\n",
    "from sklearn import tree\n",
    "t = tree.DecisionTreeClassifier(criterion=\"entropy\", max_depth=5)\n",
    "t = t.fit(d_train_att, d_train_pass)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/svg+xml": [
       "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\"?>\n",
       "<!DOCTYPE svg PUBLIC \"-//W3C//DTD SVG 1.1//EN\"\n",
       " \"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd\">\n",
       "<!-- Generated by graphviz version 2.40.1 (20161225.0304)\n",
       " -->\n",
       "<!-- Title: Tree Pages: 1 -->\n",
       "<svg width=\"2140pt\" height=\"558pt\"\n",
       " viewBox=\"0.00 0.00 2139.91 558.00\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\">\n",
       "<g id=\"graph0\" class=\"graph\" transform=\"scale(1 1) rotate(0) translate(4 554)\">\n",
       "<title>Tree</title>\n",
       "<polygon fill=\"#ffffff\" stroke=\"transparent\" points=\"-4,4 -4,-554 2135.9063,-554 2135.9063,4 -4,4\"/>\n",
       "<!-- 0 -->\n",
       "<g id=\"node1\" class=\"node\">\n",
       "<title>0</title>\n",
       "<path fill=\"#399de5\" fill-opacity=\"0.054902\" stroke=\"#000000\" d=\"M1265.5039,-550C1265.5039,-550 1138.4023,-550 1138.4023,-550 1132.4023,-550 1126.4023,-544 1126.4023,-538 1126.4023,-538 1126.4023,-498 1126.4023,-498 1126.4023,-492 1132.4023,-486 1138.4023,-486 1138.4023,-486 1265.5039,-486 1265.5039,-486 1271.5039,-486 1277.5039,-492 1277.5039,-498 1277.5039,-498 1277.5039,-538 1277.5039,-538 1277.5039,-544 1271.5039,-550 1265.5039,-550\"/>\n",
       "<text text-anchor=\"middle\" x=\"1201.9531\" y=\"-534.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\" fill=\"#000000\">failures &lt;= 0.5</text>\n",
       "<text text-anchor=\"middle\" x=\"1201.9531\" y=\"-520.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\" fill=\"#000000\">samples = 100.0%</text>\n",
       "<text text-anchor=\"middle\" x=\"1201.9531\" y=\"-506.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\" fill=\"#000000\">value = [0.486, 0.514]</text>\n",
       "<text text-anchor=\"middle\" x=\"1201.9531\" y=\"-492.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\" fill=\"#000000\">class = pass</text>\n",
       "</g>\n",
       "<!-- 1 -->\n",
       "<g id=\"node2\" class=\"node\">\n",
       "<title>1</title>\n",
       "<path fill=\"#399de5\" fill-opacity=\"0.309804\" stroke=\"#000000\" d=\"M955.5039,-450C955.5039,-450 828.4023,-450 828.4023,-450 822.4023,-450 816.4023,-444 816.4023,-438 816.4023,-438 816.4023,-398 816.4023,-398 816.4023,-392 822.4023,-386 828.4023,-386 828.4023,-386 955.5039,-386 955.5039,-386 961.5039,-386 967.5039,-392 967.5039,-398 967.5039,-398 967.5039,-438 967.5039,-438 967.5039,-444 961.5039,-450 955.5039,-450\"/>\n",
       "<text text-anchor=\"middle\" x=\"891.9531\" y=\"-434.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\" fill=\"#000000\">higher_yes &lt;= 0.5</text>\n",
       "<text text-anchor=\"middle\" x=\"891.9531\" y=\"-420.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\" fill=\"#000000\">samples = 84.8%</text>\n",
       "<text text-anchor=\"middle\" x=\"891.9531\" y=\"-406.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\" fill=\"#000000\">value = [0.408, 0.592]</text>\n",
       "<text text-anchor=\"middle\" x=\"891.9531\" y=\"-392.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\" fill=\"#000000\">class = pass</text>\n",
       "</g>\n",
       "<!-- 0&#45;&gt;1 -->\n",
       "<g id=\"edge1\" class=\"edge\">\n",
       "<title>0&#45;&gt;1</title>\n",
       "<path fill=\"none\" stroke=\"#000000\" d=\"M1126.1186,-493.5372C1081.1028,-479.016 1023.9094,-460.5665 977.315,-445.5361\"/>\n",
       "<polygon fill=\"#000000\" stroke=\"#000000\" points=\"978.133,-442.1224 967.5414,-442.3833 975.9839,-448.7844 978.133,-442.1224\"/>\n",
       "<text text-anchor=\"middle\" x=\"978.9383\" y=\"-460.4344\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\" fill=\"#000000\">True</text>\n",
       "</g>\n",
       "<!-- 24 -->\n",
       "<g id=\"node25\" class=\"node\">\n",
       "<title>24</title>\n",
       "<path fill=\"#e58139\" fill-opacity=\"0.913725\" stroke=\"#000000\" d=\"M1606.5039,-450C1606.5039,-450 1479.4023,-450 1479.4023,-450 1473.4023,-450 1467.4023,-444 1467.4023,-438 1467.4023,-438 1467.4023,-398 1467.4023,-398 1467.4023,-392 1473.4023,-386 1479.4023,-386 1479.4023,-386 1606.5039,-386 1606.5039,-386 1612.5039,-386 1618.5039,-392 1618.5039,-398 1618.5039,-398 1618.5039,-438 1618.5039,-438 1618.5039,-444 1612.5039,-450 1606.5039,-450\"/>\n",
       "<text text-anchor=\"middle\" x=\"1542.9531\" y=\"-434.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\" fill=\"#000000\">absences &lt;= 28.0</text>\n",
       "<text text-anchor=\"middle\" x=\"1542.9531\" y=\"-420.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\" fill=\"#000000\">samples = 15.2%</text>\n",
       "<text text-anchor=\"middle\" x=\"1542.9531\" y=\"-406.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\" fill=\"#000000\">value = [0.921, 0.079]</text>\n",
       "<text text-anchor=\"middle\" x=\"1542.9531\" y=\"-392.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\" fill=\"#000000\">class = fail</text>\n",
       "</g>\n",
       "<!-- 0&#45;&gt;24 -->\n",
       "<g id=\"edge24\" class=\"edge\">\n",
       "<title>0&#45;&gt;24</title>\n",
       "<path fill=\"none\" stroke=\"#000000\" d=\"M1277.6321,-495.8068C1330.8483,-480.2008 1402.1348,-459.2957 1457.4147,-443.0846\"/>\n",
       "<polygon fill=\"#000000\" stroke=\"#000000\" points=\"1458.5805,-446.3902 1467.1915,-440.2175 1456.6106,-439.673 1458.5805,-446.3902\"/>\n",
       "<text text-anchor=\"middle\" x=\"1455.2028\" y=\"-457.9554\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\" fill=\"#000000\">False</text>\n",
       "</g>\n",
       "<!-- 2 -->\n",
       "<g id=\"node3\" class=\"node\">\n",
       "<title>2</title>\n",
       "<path fill=\"#e58139\" fill-opacity=\"0.925490\" stroke=\"#000000\" d=\"M435.5039,-350C435.5039,-350 308.4023,-350 308.4023,-350 302.4023,-350 296.4023,-344 296.4023,-338 296.4023,-338 296.4023,-298 296.4023,-298 296.4023,-292 302.4023,-286 308.4023,-286 308.4023,-286 435.5039,-286 435.5039,-286 441.5039,-286 447.5039,-292 447.5039,-298 447.5039,-298 447.5039,-338 447.5039,-338 447.5039,-344 441.5039,-350 435.5039,-350\"/>\n",
       "<text text-anchor=\"middle\" x=\"371.9531\" y=\"-334.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\" fill=\"#000000\">famsup_no &lt;= 0.5</text>\n",
       "<text text-anchor=\"middle\" x=\"371.9531\" y=\"-320.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\" fill=\"#000000\">samples = 5.8%</text>\n",
       "<text text-anchor=\"middle\" x=\"371.9531\" y=\"-306.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\" fill=\"#000000\">value = [0.931, 0.069]</text>\n",
       "<text text-anchor=\"middle\" x=\"371.9531\" y=\"-292.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\" fill=\"#000000\">class = fail</text>\n",
       "</g>\n",
       "<!-- 1&#45;&gt;2 -->\n",
       "<g id=\"edge2\" class=\"edge\">\n",
       "<title>1&#45;&gt;2</title>\n",
       "<path fill=\"none\" stroke=\"#000000\" d=\"M816.3407,-403.4591C721.0257,-385.1293 557.596,-353.7006 457.7172,-334.4931\"/>\n",
       "<polygon fill=\"#000000\" stroke=\"#000000\" points=\"458.1379,-331.0099 447.6568,-332.5584 456.8159,-337.884 458.1379,-331.0099\"/>\n",
       "</g>\n",
       "<!-- 9 -->\n",
       "<g id=\"node10\" class=\"node\">\n",
       "<title>9</title>\n",
       "<path fill=\"#399de5\" fill-opacity=\"0.411765\" stroke=\"#000000\" d=\"M947.9325,-350C947.9325,-350 835.9738,-350 835.9738,-350 829.9738,-350 823.9738,-344 823.9738,-338 823.9738,-338 823.9738,-298 823.9738,-298 823.9738,-292 829.9738,-286 835.9738,-286 835.9738,-286 947.9325,-286 947.9325,-286 953.9325,-286 959.9325,-292 959.9325,-298 959.9325,-298 959.9325,-338 959.9325,-338 959.9325,-344 953.9325,-350 947.9325,-350\"/>\n",
       "<text text-anchor=\"middle\" x=\"891.9531\" y=\"-334.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\" fill=\"#000000\">Medu &lt;= 3.5</text>\n",
       "<text text-anchor=\"middle\" x=\"891.9531\" y=\"-320.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\" fill=\"#000000\">samples = 79.0%</text>\n",
       "<text text-anchor=\"middle\" x=\"891.9531\" y=\"-306.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\" fill=\"#000000\">value = [0.37, 0.63]</text>\n",
       "<text text-anchor=\"middle\" x=\"891.9531\" y=\"-292.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\" fill=\"#000000\">class = pass</text>\n",
       "</g>\n",
       "<!-- 1&#45;&gt;9 -->\n",
       "<g id=\"edge9\" class=\"edge\">\n",
       "<title>1&#45;&gt;9</title>\n",
       "<path fill=\"none\" stroke=\"#000000\" d=\"M891.9531,-385.8089C891.9531,-377.6906 891.9531,-368.8517 891.9531,-360.3186\"/>\n",
       "<polygon fill=\"#000000\" stroke=\"#000000\" points=\"895.4532,-360.1307 891.9531,-350.1308 888.4532,-360.1308 895.4532,-360.1307\"/>\n",
       "</g>\n",
       "<!-- 3 -->\n",
       "<g id=\"node4\" class=\"node\">\n",
       "<title>3</title>\n",
       "<path fill=\"#e58139\" stroke=\"#000000\" d=\"M266.8594,-243C266.8594,-243 171.0468,-243 171.0468,-243 165.0468,-243 159.0468,-237 159.0468,-231 159.0468,-231 159.0468,-205 159.0468,-205 159.0468,-199 165.0468,-193 171.0468,-193 171.0468,-193 266.8594,-193 266.8594,-193 272.8594,-193 278.8594,-199 278.8594,-205 278.8594,-205 278.8594,-231 278.8594,-231 278.8594,-237 272.8594,-243 266.8594,-243\"/>\n",
       "<text text-anchor=\"middle\" x=\"218.9531\" y=\"-227.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\" fill=\"#000000\">samples = 3.0%</text>\n",
       "<text text-anchor=\"middle\" x=\"218.9531\" y=\"-213.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\" fill=\"#000000\">value = [1.0, 0.0]</text>\n",
       "<text text-anchor=\"middle\" x=\"218.9531\" y=\"-199.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\" fill=\"#000000\">class = fail</text>\n",
       "</g>\n",
       "<!-- 2&#45;&gt;3 -->\n",
       "<g id=\"edge3\" class=\"edge\">\n",
       "<title>2&#45;&gt;3</title>\n",
       "<path fill=\"none\" stroke=\"#000000\" d=\"M322.7008,-285.8089C304.5333,-273.9347 284.0074,-260.5191 266.0364,-248.7734\"/>\n",
       "<polygon fill=\"#000000\" stroke=\"#000000\" points=\"267.7267,-245.6969 257.4411,-243.1555 263.8969,-251.5563 267.7267,-245.6969\"/>\n",
       "</g>\n",
       "<!-- 4 -->\n",
       "<g id=\"node5\" class=\"node\">\n",
       "<title>4</title>\n",
       "<path fill=\"#e58139\" fill-opacity=\"0.831373\" stroke=\"#000000\" d=\"M435.5039,-250C435.5039,-250 308.4023,-250 308.4023,-250 302.4023,-250 296.4023,-244 296.4023,-238 296.4023,-238 296.4023,-198 296.4023,-198 296.4023,-192 302.4023,-186 308.4023,-186 308.4023,-186 435.5039,-186 435.5039,-186 441.5039,-186 447.5039,-192 447.5039,-198 447.5039,-198 447.5039,-238 447.5039,-238 447.5039,-244 441.5039,-250 435.5039,-250\"/>\n",
       "<text text-anchor=\"middle\" x=\"371.9531\" y=\"-234.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\" fill=\"#000000\">Fedu &lt;= 2.5</text>\n",
       "<text text-anchor=\"middle\" x=\"371.9531\" y=\"-220.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\" fill=\"#000000\">samples = 2.8%</text>\n",
       "<text text-anchor=\"middle\" x=\"371.9531\" y=\"-206.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\" fill=\"#000000\">value = [0.857, 0.143]</text>\n",
       "<text text-anchor=\"middle\" x=\"371.9531\" y=\"-192.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\" fill=\"#000000\">class = fail</text>\n",
       "</g>\n",
       "<!-- 2&#45;&gt;4 -->\n",
       "<g id=\"edge4\" class=\"edge\">\n",
       "<title>2&#45;&gt;4</title>\n",
       "<path fill=\"none\" stroke=\"#000000\" d=\"M371.9531,-285.8089C371.9531,-277.6906 371.9531,-268.8517 371.9531,-260.3186\"/>\n",
       "<polygon fill=\"#000000\" stroke=\"#000000\" points=\"375.4532,-260.1307 371.9531,-250.1308 368.4532,-260.1308 375.4532,-260.1307\"/>\n",
       "</g>\n",
       "<!-- 5 -->\n",
       "<g id=\"node6\" class=\"node\">\n",
       "<title>5</title>\n",
       "<path fill=\"#e58139\" fill-opacity=\"0.917647\" stroke=\"#000000\" d=\"M279.6214,-150C279.6214,-150 146.2848,-150 146.2848,-150 140.2848,-150 134.2848,-144 134.2848,-138 134.2848,-138 134.2848,-98 134.2848,-98 134.2848,-92 140.2848,-86 146.2848,-86 146.2848,-86 279.6214,-86 279.6214,-86 285.6214,-86 291.6214,-92 291.6214,-98 291.6214,-98 291.6214,-138 291.6214,-138 291.6214,-144 285.6214,-150 279.6214,-150\"/>\n",
       "<text text-anchor=\"middle\" x=\"212.9531\" y=\"-134.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\" fill=\"#000000\">guardian_father &lt;= 0.5</text>\n",
       "<text text-anchor=\"middle\" x=\"212.9531\" y=\"-120.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\" fill=\"#000000\">samples = 2.6%</text>\n",
       "<text text-anchor=\"middle\" x=\"212.9531\" y=\"-106.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\" fill=\"#000000\">value = [0.923, 0.077]</text>\n",
       "<text text-anchor=\"middle\" x=\"212.9531\" y=\"-92.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\" fill=\"#000000\">class = fail</text>\n",
       "</g>\n",
       "<!-- 4&#45;&gt;5 -->\n",
       "<g id=\"edge5\" class=\"edge\">\n",
       "<title>4&#45;&gt;5</title>\n",
       "<path fill=\"none\" stroke=\"#000000\" d=\"M320.7693,-185.8089C305.4497,-176.174 288.5165,-165.5241 272.6974,-155.575\"/>\n",
       "<polygon fill=\"#000000\" stroke=\"#000000\" points=\"274.3694,-152.4919 264.041,-150.1308 270.6427,-158.4175 274.3694,-152.4919\"/>\n",
       "</g>\n",
       "<!-- 8 -->\n",
       "<g id=\"node9\" class=\"node\">\n",
       "<title>8</title>\n",
       "<path fill=\"#399de5\" stroke=\"#000000\" d=\"M419.8594,-143C419.8594,-143 324.0468,-143 324.0468,-143 318.0468,-143 312.0468,-137 312.0468,-131 312.0468,-131 312.0468,-105 312.0468,-105 312.0468,-99 318.0468,-93 324.0468,-93 324.0468,-93 419.8594,-93 419.8594,-93 425.8594,-93 431.8594,-99 431.8594,-105 431.8594,-105 431.8594,-131 431.8594,-131 431.8594,-137 425.8594,-143 419.8594,-143\"/>\n",
       "<text text-anchor=\"middle\" x=\"371.9531\" y=\"-127.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\" fill=\"#000000\">samples = 0.2%</text>\n",
       "<text text-anchor=\"middle\" x=\"371.9531\" y=\"-113.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\" fill=\"#000000\">value = [0.0, 1.0]</text>\n",
       "<text text-anchor=\"middle\" x=\"371.9531\" y=\"-99.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\" fill=\"#000000\">class = pass</text>\n",
       "</g>\n",
       "<!-- 4&#45;&gt;8 -->\n",
       "<g id=\"edge8\" class=\"edge\">\n",
       "<title>4&#45;&gt;8</title>\n",
       "<path fill=\"none\" stroke=\"#000000\" d=\"M371.9531,-185.8089C371.9531,-175.446 371.9531,-163.909 371.9531,-153.3327\"/>\n",
       "<polygon fill=\"#000000\" stroke=\"#000000\" points=\"375.4532,-153.1555 371.9531,-143.1555 368.4532,-153.1556 375.4532,-153.1555\"/>\n",
       "</g>\n",
       "<!-- 6 -->\n",
       "<g id=\"node7\" class=\"node\">\n",
       "<title>6</title>\n",
       "<path fill=\"#e58139\" stroke=\"#000000\" d=\"M107.8594,-50C107.8594,-50 12.0468,-50 12.0468,-50 6.0468,-50 .0468,-44 .0468,-38 .0468,-38 .0468,-12 .0468,-12 .0468,-6 6.0468,0 12.0468,0 12.0468,0 107.8594,0 107.8594,0 113.8594,0 119.8594,-6 119.8594,-12 119.8594,-12 119.8594,-38 119.8594,-38 119.8594,-44 113.8594,-50 107.8594,-50\"/>\n",
       "<text text-anchor=\"middle\" x=\"59.9531\" y=\"-34.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\" fill=\"#000000\">samples = 2.0%</text>\n",
       "<text text-anchor=\"middle\" x=\"59.9531\" y=\"-20.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\" fill=\"#000000\">value = [1.0, 0.0]</text>\n",
       "<text text-anchor=\"middle\" x=\"59.9531\" y=\"-6.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\" fill=\"#000000\">class = fail</text>\n",
       "</g>\n",
       "<!-- 5&#45;&gt;6 -->\n",
       "<g id=\"edge6\" class=\"edge\">\n",
       "<title>5&#45;&gt;6</title>\n",
       "<path fill=\"none\" stroke=\"#000000\" d=\"M160.2992,-85.9947C143.962,-76.0642 126.0126,-65.1538 109.8674,-55.3401\"/>\n",
       "<polygon fill=\"#000000\" stroke=\"#000000\" points=\"111.4684,-52.2174 101.1052,-50.014 107.8325,-58.1991 111.4684,-52.2174\"/>\n",
       "</g>\n",
       "<!-- 7 -->\n",
       "<g id=\"node8\" class=\"node\">\n",
       "<title>7</title>\n",
       "<path fill=\"#e58139\" fill-opacity=\"0.498039\" stroke=\"#000000\" d=\"M276.5039,-50C276.5039,-50 149.4023,-50 149.4023,-50 143.4023,-50 137.4023,-44 137.4023,-38 137.4023,-38 137.4023,-12 137.4023,-12 137.4023,-6 143.4023,0 149.4023,0 149.4023,0 276.5039,0 276.5039,0 282.5039,0 288.5039,-6 288.5039,-12 288.5039,-12 288.5039,-38 288.5039,-38 288.5039,-44 282.5039,-50 276.5039,-50\"/>\n",
       "<text text-anchor=\"middle\" x=\"212.9531\" y=\"-34.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\" fill=\"#000000\">samples = 0.6%</text>\n",
       "<text text-anchor=\"middle\" x=\"212.9531\" y=\"-20.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\" fill=\"#000000\">value = [0.667, 0.333]</text>\n",
       "<text text-anchor=\"middle\" x=\"212.9531\" y=\"-6.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\" fill=\"#000000\">class = fail</text>\n",
       "</g>\n",
       "<!-- 5&#45;&gt;7 -->\n",
       "<g id=\"edge7\" class=\"edge\">\n",
       "<title>5&#45;&gt;7</title>\n",
       "<path fill=\"none\" stroke=\"#000000\" d=\"M212.9531,-85.9947C212.9531,-77.6273 212.9531,-68.5643 212.9531,-60.0478\"/>\n",
       "<polygon fill=\"#000000\" stroke=\"#000000\" points=\"216.4532,-60.014 212.9531,-50.014 209.4532,-60.0141 216.4532,-60.014\"/>\n",
       "</g>\n",
       "<!-- 10 -->\n",
       "<g id=\"node11\" class=\"node\">\n",
       "<title>10</title>\n",
       "<path fill=\"#399de5\" fill-opacity=\"0.203922\" stroke=\"#000000\" d=\"M840.5039,-250C840.5039,-250 713.4023,-250 713.4023,-250 707.4023,-250 701.4023,-244 701.4023,-238 701.4023,-238 701.4023,-198 701.4023,-198 701.4023,-192 707.4023,-186 713.4023,-186 713.4023,-186 840.5039,-186 840.5039,-186 846.5039,-186 852.5039,-192 852.5039,-198 852.5039,-198 852.5039,-238 852.5039,-238 852.5039,-244 846.5039,-250 840.5039,-250\"/>\n",
       "<text text-anchor=\"middle\" x=\"776.9531\" y=\"-234.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\" fill=\"#000000\">school_GP &lt;= 0.5</text>\n",
       "<text text-anchor=\"middle\" x=\"776.9531\" y=\"-220.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\" fill=\"#000000\">samples = 52.8%</text>\n",
       "<text text-anchor=\"middle\" x=\"776.9531\" y=\"-206.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\" fill=\"#000000\">value = [0.443, 0.557]</text>\n",
       "<text text-anchor=\"middle\" x=\"776.9531\" y=\"-192.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\" fill=\"#000000\">class = pass</text>\n",
       "</g>\n",
       "<!-- 9&#45;&gt;10 -->\n",
       "<g id=\"edge10\" class=\"edge\">\n",
       "<title>9&#45;&gt;10</title>\n",
       "<path fill=\"none\" stroke=\"#000000\" d=\"M854.9334,-285.8089C844.3662,-276.62 832.7374,-266.508 821.7585,-256.9612\"/>\n",
       "<polygon fill=\"#000000\" stroke=\"#000000\" points=\"823.7462,-254.0515 813.9035,-250.1308 819.1529,-259.3337 823.7462,-254.0515\"/>\n",
       "</g>\n",
       "<!-- 17 -->\n",
       "<g id=\"node18\" class=\"node\">\n",
       "<title>17</title>\n",
       "<path fill=\"#399de5\" fill-opacity=\"0.713725\" stroke=\"#000000\" d=\"M1150.5039,-250C1150.5039,-250 1023.4023,-250 1023.4023,-250 1017.4023,-250 1011.4023,-244 1011.4023,-238 1011.4023,-238 1011.4023,-198 1011.4023,-198 1011.4023,-192 1017.4023,-186 1023.4023,-186 1023.4023,-186 1150.5039,-186 1150.5039,-186 1156.5039,-186 1162.5039,-192 1162.5039,-198 1162.5039,-198 1162.5039,-238 1162.5039,-238 1162.5039,-244 1156.5039,-250 1150.5039,-250\"/>\n",
       "<text text-anchor=\"middle\" x=\"1086.9531\" y=\"-234.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\" fill=\"#000000\">absences &lt;= 4.5</text>\n",
       "<text text-anchor=\"middle\" x=\"1086.9531\" y=\"-220.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\" fill=\"#000000\">samples = 26.2%</text>\n",
       "<text text-anchor=\"middle\" x=\"1086.9531\" y=\"-206.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\" fill=\"#000000\">value = [0.221, 0.779]</text>\n",
       "<text text-anchor=\"middle\" x=\"1086.9531\" y=\"-192.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\" fill=\"#000000\">class = pass</text>\n",
       "</g>\n",
       "<!-- 9&#45;&gt;17 -->\n",
       "<g id=\"edge17\" class=\"edge\">\n",
       "<title>9&#45;&gt;17</title>\n",
       "<path fill=\"none\" stroke=\"#000000\" d=\"M954.457,-285.9467C973.8745,-275.989 995.4272,-264.9364 1015.4108,-254.6884\"/>\n",
       "<polygon fill=\"#000000\" stroke=\"#000000\" points=\"1017.1676,-257.7209 1024.4687,-250.0433 1013.9734,-251.4922 1017.1676,-257.7209\"/>\n",
       "</g>\n",
       "<!-- 11 -->\n",
       "<g id=\"node12\" class=\"node\">\n",
       "<title>11</title>\n",
       "<path fill=\"#e58139\" fill-opacity=\"0.356863\" stroke=\"#000000\" d=\"M590.5039,-150C590.5039,-150 463.4023,-150 463.4023,-150 457.4023,-150 451.4023,-144 451.4023,-138 451.4023,-138 451.4023,-98 451.4023,-98 451.4023,-92 457.4023,-86 463.4023,-86 463.4023,-86 590.5039,-86 590.5039,-86 596.5039,-86 602.5039,-92 602.5039,-98 602.5039,-98 602.5039,-138 602.5039,-138 602.5039,-144 596.5039,-150 590.5039,-150\"/>\n",
       "<text text-anchor=\"middle\" x=\"526.9531\" y=\"-134.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\" fill=\"#000000\">goout &lt;= 2.5</text>\n",
       "<text text-anchor=\"middle\" x=\"526.9531\" y=\"-120.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\" fill=\"#000000\">samples = 17.4%</text>\n",
       "<text text-anchor=\"middle\" x=\"526.9531\" y=\"-106.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\" fill=\"#000000\">value = [0.609, 0.391]</text>\n",
       "<text text-anchor=\"middle\" x=\"526.9531\" y=\"-92.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\" fill=\"#000000\">class = fail</text>\n",
       "</g>\n",
       "<!-- 10&#45;&gt;11 -->\n",
       "<g id=\"edge11\" class=\"edge\">\n",
       "<title>10&#45;&gt;11</title>\n",
       "<path fill=\"none\" stroke=\"#000000\" d=\"M701.2664,-187.7253C673.2479,-176.5179 641.2926,-163.7358 612.4613,-152.2033\"/>\n",
       "<polygon fill=\"#000000\" stroke=\"#000000\" points=\"613.3983,-148.8085 602.8136,-148.3442 610.7985,-155.3078 613.3983,-148.8085\"/>\n",
       "</g>\n",
       "<!-- 14 -->\n",
       "<g id=\"node15\" class=\"node\">\n",
       "<title>14</title>\n",
       "<path fill=\"#399de5\" fill-opacity=\"0.435294\" stroke=\"#000000\" d=\"M840.5039,-150C840.5039,-150 713.4023,-150 713.4023,-150 707.4023,-150 701.4023,-144 701.4023,-138 701.4023,-138 701.4023,-98 701.4023,-98 701.4023,-92 707.4023,-86 713.4023,-86 713.4023,-86 840.5039,-86 840.5039,-86 846.5039,-86 852.5039,-92 852.5039,-98 852.5039,-98 852.5039,-138 852.5039,-138 852.5039,-144 846.5039,-150 840.5039,-150\"/>\n",
       "<text text-anchor=\"middle\" x=\"776.9531\" y=\"-134.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\" fill=\"#000000\">Fjob_other &lt;= 0.5</text>\n",
       "<text text-anchor=\"middle\" x=\"776.9531\" y=\"-120.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\" fill=\"#000000\">samples = 35.4%</text>\n",
       "<text text-anchor=\"middle\" x=\"776.9531\" y=\"-106.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\" fill=\"#000000\">value = [0.362, 0.638]</text>\n",
       "<text text-anchor=\"middle\" x=\"776.9531\" y=\"-92.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\" fill=\"#000000\">class = pass</text>\n",
       "</g>\n",
       "<!-- 10&#45;&gt;14 -->\n",
       "<g id=\"edge14\" class=\"edge\">\n",
       "<title>10&#45;&gt;14</title>\n",
       "<path fill=\"none\" stroke=\"#000000\" d=\"M776.9531,-185.8089C776.9531,-177.6906 776.9531,-168.8517 776.9531,-160.3186\"/>\n",
       "<polygon fill=\"#000000\" stroke=\"#000000\" points=\"780.4532,-160.1307 776.9531,-150.1308 773.4532,-160.1308 780.4532,-160.1307\"/>\n",
       "</g>\n",
       "<!-- 12 -->\n",
       "<g id=\"node13\" class=\"node\">\n",
       "<title>12</title>\n",
       "<path fill=\"#399de5\" fill-opacity=\"0.439216\" stroke=\"#000000\" d=\"M429.9325,-50C429.9325,-50 317.9738,-50 317.9738,-50 311.9738,-50 305.9738,-44 305.9738,-38 305.9738,-38 305.9738,-12 305.9738,-12 305.9738,-6 311.9738,0 317.9738,0 317.9738,0 429.9325,0 429.9325,0 435.9325,0 441.9325,-6 441.9325,-12 441.9325,-12 441.9325,-38 441.9325,-38 441.9325,-44 435.9325,-50 429.9325,-50\"/>\n",
       "<text text-anchor=\"middle\" x=\"373.9531\" y=\"-34.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\" fill=\"#000000\">samples = 5.0%</text>\n",
       "<text text-anchor=\"middle\" x=\"373.9531\" y=\"-20.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\" fill=\"#000000\">value = [0.36, 0.64]</text>\n",
       "<text text-anchor=\"middle\" x=\"373.9531\" y=\"-6.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\" fill=\"#000000\">class = pass</text>\n",
       "</g>\n",
       "<!-- 11&#45;&gt;12 -->\n",
       "<g id=\"edge12\" class=\"edge\">\n",
       "<title>11&#45;&gt;12</title>\n",
       "<path fill=\"none\" stroke=\"#000000\" d=\"M474.2992,-85.9947C457.962,-76.0642 440.0126,-65.1538 423.8674,-55.3401\"/>\n",
       "<polygon fill=\"#000000\" stroke=\"#000000\" points=\"425.4684,-52.2174 415.1052,-50.014 421.8325,-58.1991 425.4684,-52.2174\"/>\n",
       "</g>\n",
       "<!-- 13 -->\n",
       "<g id=\"node14\" class=\"node\">\n",
       "<title>13</title>\n",
       "<path fill=\"#e58139\" fill-opacity=\"0.592157\" stroke=\"#000000\" d=\"M582.9325,-50C582.9325,-50 470.9738,-50 470.9738,-50 464.9738,-50 458.9738,-44 458.9738,-38 458.9738,-38 458.9738,-12 458.9738,-12 458.9738,-6 464.9738,0 470.9738,0 470.9738,0 582.9325,0 582.9325,0 588.9325,0 594.9325,-6 594.9325,-12 594.9325,-12 594.9325,-38 594.9325,-38 594.9325,-44 588.9325,-50 582.9325,-50\"/>\n",
       "<text text-anchor=\"middle\" x=\"526.9531\" y=\"-34.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\" fill=\"#000000\">samples = 12.4%</text>\n",
       "<text text-anchor=\"middle\" x=\"526.9531\" y=\"-20.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\" fill=\"#000000\">value = [0.71, 0.29]</text>\n",
       "<text text-anchor=\"middle\" x=\"526.9531\" y=\"-6.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\" fill=\"#000000\">class = fail</text>\n",
       "</g>\n",
       "<!-- 11&#45;&gt;13 -->\n",
       "<g id=\"edge13\" class=\"edge\">\n",
       "<title>11&#45;&gt;13</title>\n",
       "<path fill=\"none\" stroke=\"#000000\" d=\"M526.9531,-85.9947C526.9531,-77.6273 526.9531,-68.5643 526.9531,-60.0478\"/>\n",
       "<polygon fill=\"#000000\" stroke=\"#000000\" points=\"530.4532,-60.014 526.9531,-50.014 523.4532,-60.0141 530.4532,-60.014\"/>\n",
       "</g>\n",
       "<!-- 15 -->\n",
       "<g id=\"node16\" class=\"node\">\n",
       "<title>15</title>\n",
       "<path fill=\"#e58139\" fill-opacity=\"0.031373\" stroke=\"#000000\" d=\"M751.5039,-50C751.5039,-50 624.4023,-50 624.4023,-50 618.4023,-50 612.4023,-44 612.4023,-38 612.4023,-38 612.4023,-12 612.4023,-12 612.4023,-6 618.4023,0 624.4023,0 624.4023,0 751.5039,0 751.5039,0 757.5039,0 763.5039,-6 763.5039,-12 763.5039,-12 763.5039,-38 763.5039,-38 763.5039,-44 757.5039,-50 751.5039,-50\"/>\n",
       "<text text-anchor=\"middle\" x=\"687.9531\" y=\"-34.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\" fill=\"#000000\">samples = 12.6%</text>\n",
       "<text text-anchor=\"middle\" x=\"687.9531\" y=\"-20.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\" fill=\"#000000\">value = [0.508, 0.492]</text>\n",
       "<text text-anchor=\"middle\" x=\"687.9531\" y=\"-6.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\" fill=\"#000000\">class = fail</text>\n",
       "</g>\n",
       "<!-- 14&#45;&gt;15 -->\n",
       "<g id=\"edge15\" class=\"edge\">\n",
       "<title>14&#45;&gt;15</title>\n",
       "<path fill=\"none\" stroke=\"#000000\" d=\"M746.3244,-85.9947C737.437,-76.7079 727.7294,-66.564 718.8271,-57.2616\"/>\n",
       "<polygon fill=\"#000000\" stroke=\"#000000\" points=\"721.334,-54.8189 711.8913,-50.014 716.2766,-59.6587 721.334,-54.8189\"/>\n",
       "</g>\n",
       "<!-- 16 -->\n",
       "<g id=\"node17\" class=\"node\">\n",
       "<title>16</title>\n",
       "<path fill=\"#399de5\" fill-opacity=\"0.607843\" stroke=\"#000000\" d=\"M920.5039,-50C920.5039,-50 793.4023,-50 793.4023,-50 787.4023,-50 781.4023,-44 781.4023,-38 781.4023,-38 781.4023,-12 781.4023,-12 781.4023,-6 787.4023,0 793.4023,0 793.4023,0 920.5039,0 920.5039,0 926.5039,0 932.5039,-6 932.5039,-12 932.5039,-12 932.5039,-38 932.5039,-38 932.5039,-44 926.5039,-50 920.5039,-50\"/>\n",
       "<text text-anchor=\"middle\" x=\"856.9531\" y=\"-34.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\" fill=\"#000000\">samples = 22.8%</text>\n",
       "<text text-anchor=\"middle\" x=\"856.9531\" y=\"-20.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\" fill=\"#000000\">value = [0.281, 0.719]</text>\n",
       "<text text-anchor=\"middle\" x=\"856.9531\" y=\"-6.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\" fill=\"#000000\">class = pass</text>\n",
       "</g>\n",
       "<!-- 14&#45;&gt;16 -->\n",
       "<g id=\"edge16\" class=\"edge\">\n",
       "<title>14&#45;&gt;16</title>\n",
       "<path fill=\"none\" stroke=\"#000000\" d=\"M804.4846,-85.9947C812.3151,-76.8917 820.8539,-66.9654 828.725,-57.8152\"/>\n",
       "<polygon fill=\"#000000\" stroke=\"#000000\" points=\"831.5677,-59.8776 835.4357,-50.014 826.2609,-55.3126 831.5677,-59.8776\"/>\n",
       "</g>\n",
       "<!-- 18 -->\n",
       "<g id=\"node19\" class=\"node\">\n",
       "<title>18</title>\n",
       "<path fill=\"#399de5\" fill-opacity=\"0.803922\" stroke=\"#000000\" d=\"M1150.5039,-150C1150.5039,-150 1023.4023,-150 1023.4023,-150 1017.4023,-150 1011.4023,-144 1011.4023,-138 1011.4023,-138 1011.4023,-98 1011.4023,-98 1011.4023,-92 1017.4023,-86 1023.4023,-86 1023.4023,-86 1150.5039,-86 1150.5039,-86 1156.5039,-86 1162.5039,-92 1162.5039,-98 1162.5039,-98 1162.5039,-138 1162.5039,-138 1162.5039,-144 1156.5039,-150 1150.5039,-150\"/>\n",
       "<text text-anchor=\"middle\" x=\"1086.9531\" y=\"-134.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\" fill=\"#000000\">freetime &lt;= 4.5</text>\n",
       "<text text-anchor=\"middle\" x=\"1086.9531\" y=\"-120.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\" fill=\"#000000\">samples = 20.6%</text>\n",
       "<text text-anchor=\"middle\" x=\"1086.9531\" y=\"-106.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\" fill=\"#000000\">value = [0.165, 0.835]</text>\n",
       "<text text-anchor=\"middle\" x=\"1086.9531\" y=\"-92.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\" fill=\"#000000\">class = pass</text>\n",
       "</g>\n",
       "<!-- 17&#45;&gt;18 -->\n",
       "<g id=\"edge18\" class=\"edge\">\n",
       "<title>17&#45;&gt;18</title>\n",
       "<path fill=\"none\" stroke=\"#000000\" d=\"M1086.9531,-185.8089C1086.9531,-177.6906 1086.9531,-168.8517 1086.9531,-160.3186\"/>\n",
       "<polygon fill=\"#000000\" stroke=\"#000000\" points=\"1090.4532,-160.1307 1086.9531,-150.1308 1083.4532,-160.1308 1090.4532,-160.1307\"/>\n",
       "</g>\n",
       "<!-- 21 -->\n",
       "<g id=\"node22\" class=\"node\">\n",
       "<title>21</title>\n",
       "<path fill=\"#399de5\" fill-opacity=\"0.250980\" stroke=\"#000000\" d=\"M1380.5039,-150C1380.5039,-150 1253.4023,-150 1253.4023,-150 1247.4023,-150 1241.4023,-144 1241.4023,-138 1241.4023,-138 1241.4023,-98 1241.4023,-98 1241.4023,-92 1247.4023,-86 1253.4023,-86 1253.4023,-86 1380.5039,-86 1380.5039,-86 1386.5039,-86 1392.5039,-92 1392.5039,-98 1392.5039,-98 1392.5039,-138 1392.5039,-138 1392.5039,-144 1386.5039,-150 1380.5039,-150\"/>\n",
       "<text text-anchor=\"middle\" x=\"1316.9531\" y=\"-134.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\" fill=\"#000000\">Fedu &lt;= 2.5</text>\n",
       "<text text-anchor=\"middle\" x=\"1316.9531\" y=\"-120.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\" fill=\"#000000\">samples = 5.6%</text>\n",
       "<text text-anchor=\"middle\" x=\"1316.9531\" y=\"-106.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\" fill=\"#000000\">value = [0.429, 0.571]</text>\n",
       "<text text-anchor=\"middle\" x=\"1316.9531\" y=\"-92.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\" fill=\"#000000\">class = pass</text>\n",
       "</g>\n",
       "<!-- 17&#45;&gt;21 -->\n",
       "<g id=\"edge21\" class=\"edge\">\n",
       "<title>17&#45;&gt;21</title>\n",
       "<path fill=\"none\" stroke=\"#000000\" d=\"M1160.6756,-185.9467C1183.991,-175.8096 1209.9163,-164.5377 1233.8421,-154.1352\"/>\n",
       "<polygon fill=\"#000000\" stroke=\"#000000\" points=\"1235.4784,-157.2404 1243.2535,-150.0433 1232.6873,-150.8209 1235.4784,-157.2404\"/>\n",
       "</g>\n",
       "<!-- 19 -->\n",
       "<g id=\"node20\" class=\"node\">\n",
       "<title>19</title>\n",
       "<path fill=\"#399de5\" fill-opacity=\"0.843137\" stroke=\"#000000\" d=\"M1089.5039,-50C1089.5039,-50 962.4023,-50 962.4023,-50 956.4023,-50 950.4023,-44 950.4023,-38 950.4023,-38 950.4023,-12 950.4023,-12 950.4023,-6 956.4023,0 962.4023,0 962.4023,0 1089.5039,0 1089.5039,0 1095.5039,0 1101.5039,-6 1101.5039,-12 1101.5039,-12 1101.5039,-38 1101.5039,-38 1101.5039,-44 1095.5039,-50 1089.5039,-50\"/>\n",
       "<text text-anchor=\"middle\" x=\"1025.9531\" y=\"-34.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\" fill=\"#000000\">samples = 19.0%</text>\n",
       "<text text-anchor=\"middle\" x=\"1025.9531\" y=\"-20.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\" fill=\"#000000\">value = [0.137, 0.863]</text>\n",
       "<text text-anchor=\"middle\" x=\"1025.9531\" y=\"-6.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\" fill=\"#000000\">class = pass</text>\n",
       "</g>\n",
       "<!-- 18&#45;&gt;19 -->\n",
       "<g id=\"edge19\" class=\"edge\">\n",
       "<title>18&#45;&gt;19</title>\n",
       "<path fill=\"none\" stroke=\"#000000\" d=\"M1065.9604,-85.9947C1060.1706,-77.1676 1053.8729,-67.5662 1048.024,-58.6491\"/>\n",
       "<polygon fill=\"#000000\" stroke=\"#000000\" points=\"1050.7714,-56.4562 1042.3602,-50.014 1044.9182,-60.2954 1050.7714,-56.4562\"/>\n",
       "</g>\n",
       "<!-- 20 -->\n",
       "<g id=\"node21\" class=\"node\">\n",
       "<title>20</title>\n",
       "<path fill=\"transparent\" stroke=\"#000000\" d=\"M1226.8594,-50C1226.8594,-50 1131.0468,-50 1131.0468,-50 1125.0468,-50 1119.0468,-44 1119.0468,-38 1119.0468,-38 1119.0468,-12 1119.0468,-12 1119.0468,-6 1125.0468,0 1131.0468,0 1131.0468,0 1226.8594,0 1226.8594,0 1232.8594,0 1238.8594,-6 1238.8594,-12 1238.8594,-12 1238.8594,-38 1238.8594,-38 1238.8594,-44 1232.8594,-50 1226.8594,-50\"/>\n",
       "<text text-anchor=\"middle\" x=\"1178.9531\" y=\"-34.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\" fill=\"#000000\">samples = 1.6%</text>\n",
       "<text text-anchor=\"middle\" x=\"1178.9531\" y=\"-20.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\" fill=\"#000000\">value = [0.5, 0.5]</text>\n",
       "<text text-anchor=\"middle\" x=\"1178.9531\" y=\"-6.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\" fill=\"#000000\">class = fail</text>\n",
       "</g>\n",
       "<!-- 18&#45;&gt;20 -->\n",
       "<g id=\"edge20\" class=\"edge\">\n",
       "<title>18&#45;&gt;20</title>\n",
       "<path fill=\"none\" stroke=\"#000000\" d=\"M1118.6143,-85.9947C1127.8013,-76.7079 1137.8361,-66.564 1147.0385,-57.2616\"/>\n",
       "<polygon fill=\"#000000\" stroke=\"#000000\" points=\"1149.6635,-59.5847 1154.2081,-50.014 1144.6871,-54.6618 1149.6635,-59.5847\"/>\n",
       "</g>\n",
       "<!-- 22 -->\n",
       "<g id=\"node23\" class=\"node\">\n",
       "<title>22</title>\n",
       "<path fill=\"#e58139\" stroke=\"#000000\" d=\"M1364.8594,-50C1364.8594,-50 1269.0468,-50 1269.0468,-50 1263.0468,-50 1257.0468,-44 1257.0468,-38 1257.0468,-38 1257.0468,-12 1257.0468,-12 1257.0468,-6 1263.0468,0 1269.0468,0 1269.0468,0 1364.8594,0 1364.8594,0 1370.8594,0 1376.8594,-6 1376.8594,-12 1376.8594,-12 1376.8594,-38 1376.8594,-38 1376.8594,-44 1370.8594,-50 1364.8594,-50\"/>\n",
       "<text text-anchor=\"middle\" x=\"1316.9531\" y=\"-34.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\" fill=\"#000000\">samples = 0.8%</text>\n",
       "<text text-anchor=\"middle\" x=\"1316.9531\" y=\"-20.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\" fill=\"#000000\">value = [1.0, 0.0]</text>\n",
       "<text text-anchor=\"middle\" x=\"1316.9531\" y=\"-6.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\" fill=\"#000000\">class = fail</text>\n",
       "</g>\n",
       "<!-- 21&#45;&gt;22 -->\n",
       "<g id=\"edge22\" class=\"edge\">\n",
       "<title>21&#45;&gt;22</title>\n",
       "<path fill=\"none\" stroke=\"#000000\" d=\"M1316.9531,-85.9947C1316.9531,-77.6273 1316.9531,-68.5643 1316.9531,-60.0478\"/>\n",
       "<polygon fill=\"#000000\" stroke=\"#000000\" points=\"1320.4532,-60.014 1316.9531,-50.014 1313.4532,-60.0141 1320.4532,-60.014\"/>\n",
       "</g>\n",
       "<!-- 23 -->\n",
       "<g id=\"node24\" class=\"node\">\n",
       "<title>23</title>\n",
       "<path fill=\"#399de5\" fill-opacity=\"0.498039\" stroke=\"#000000\" d=\"M1533.5039,-50C1533.5039,-50 1406.4023,-50 1406.4023,-50 1400.4023,-50 1394.4023,-44 1394.4023,-38 1394.4023,-38 1394.4023,-12 1394.4023,-12 1394.4023,-6 1400.4023,0 1406.4023,0 1406.4023,0 1533.5039,0 1533.5039,0 1539.5039,0 1545.5039,-6 1545.5039,-12 1545.5039,-12 1545.5039,-38 1545.5039,-38 1545.5039,-44 1539.5039,-50 1533.5039,-50\"/>\n",
       "<text text-anchor=\"middle\" x=\"1469.9531\" y=\"-34.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\" fill=\"#000000\">samples = 4.8%</text>\n",
       "<text text-anchor=\"middle\" x=\"1469.9531\" y=\"-20.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\" fill=\"#000000\">value = [0.333, 0.667]</text>\n",
       "<text text-anchor=\"middle\" x=\"1469.9531\" y=\"-6.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\" fill=\"#000000\">class = pass</text>\n",
       "</g>\n",
       "<!-- 21&#45;&gt;23 -->\n",
       "<g id=\"edge23\" class=\"edge\">\n",
       "<title>21&#45;&gt;23</title>\n",
       "<path fill=\"none\" stroke=\"#000000\" d=\"M1369.607,-85.9947C1385.9443,-76.0642 1403.8937,-65.1538 1420.0388,-55.3401\"/>\n",
       "<polygon fill=\"#000000\" stroke=\"#000000\" points=\"1422.0737,-58.1991 1428.801,-50.014 1418.4378,-52.2174 1422.0737,-58.1991\"/>\n",
       "</g>\n",
       "<!-- 25 -->\n",
       "<g id=\"node26\" class=\"node\">\n",
       "<title>25</title>\n",
       "<path fill=\"#e58139\" fill-opacity=\"0.929412\" stroke=\"#000000\" d=\"M1606.5039,-350C1606.5039,-350 1479.4023,-350 1479.4023,-350 1473.4023,-350 1467.4023,-344 1467.4023,-338 1467.4023,-338 1467.4023,-298 1467.4023,-298 1467.4023,-292 1473.4023,-286 1479.4023,-286 1479.4023,-286 1606.5039,-286 1606.5039,-286 1612.5039,-286 1618.5039,-292 1618.5039,-298 1618.5039,-298 1618.5039,-338 1618.5039,-338 1618.5039,-344 1612.5039,-350 1606.5039,-350\"/>\n",
       "<text text-anchor=\"middle\" x=\"1542.9531\" y=\"-334.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\" fill=\"#000000\">internet_no &lt;= 0.5</text>\n",
       "<text text-anchor=\"middle\" x=\"1542.9531\" y=\"-320.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\" fill=\"#000000\">samples = 15.0%</text>\n",
       "<text text-anchor=\"middle\" x=\"1542.9531\" y=\"-306.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\" fill=\"#000000\">value = [0.933, 0.067]</text>\n",
       "<text text-anchor=\"middle\" x=\"1542.9531\" y=\"-292.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\" fill=\"#000000\">class = fail</text>\n",
       "</g>\n",
       "<!-- 24&#45;&gt;25 -->\n",
       "<g id=\"edge25\" class=\"edge\">\n",
       "<title>24&#45;&gt;25</title>\n",
       "<path fill=\"none\" stroke=\"#000000\" d=\"M1542.9531,-385.8089C1542.9531,-377.6906 1542.9531,-368.8517 1542.9531,-360.3186\"/>\n",
       "<polygon fill=\"#000000\" stroke=\"#000000\" points=\"1546.4532,-360.1307 1542.9531,-350.1308 1539.4532,-360.1308 1546.4532,-360.1307\"/>\n",
       "</g>\n",
       "<!-- 36 -->\n",
       "<g id=\"node37\" class=\"node\">\n",
       "<title>36</title>\n",
       "<path fill=\"#399de5\" stroke=\"#000000\" d=\"M1743.8594,-343C1743.8594,-343 1648.0468,-343 1648.0468,-343 1642.0468,-343 1636.0468,-337 1636.0468,-331 1636.0468,-331 1636.0468,-305 1636.0468,-305 1636.0468,-299 1642.0468,-293 1648.0468,-293 1648.0468,-293 1743.8594,-293 1743.8594,-293 1749.8594,-293 1755.8594,-299 1755.8594,-305 1755.8594,-305 1755.8594,-331 1755.8594,-331 1755.8594,-337 1749.8594,-343 1743.8594,-343\"/>\n",
       "<text text-anchor=\"middle\" x=\"1695.9531\" y=\"-327.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\" fill=\"#000000\">samples = 0.2%</text>\n",
       "<text text-anchor=\"middle\" x=\"1695.9531\" y=\"-313.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\" fill=\"#000000\">value = [0.0, 1.0]</text>\n",
       "<text text-anchor=\"middle\" x=\"1695.9531\" y=\"-299.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\" fill=\"#000000\">class = pass</text>\n",
       "</g>\n",
       "<!-- 24&#45;&gt;36 -->\n",
       "<g id=\"edge36\" class=\"edge\">\n",
       "<title>24&#45;&gt;36</title>\n",
       "<path fill=\"none\" stroke=\"#000000\" d=\"M1592.2055,-385.8089C1610.373,-373.9347 1630.8989,-360.5191 1648.8698,-348.7734\"/>\n",
       "<polygon fill=\"#000000\" stroke=\"#000000\" points=\"1651.0093,-351.5563 1657.4651,-343.1555 1647.1796,-345.6969 1651.0093,-351.5563\"/>\n",
       "</g>\n",
       "<!-- 26 -->\n",
       "<g id=\"node27\" class=\"node\">\n",
       "<title>26</title>\n",
       "<path fill=\"#e58139\" fill-opacity=\"0.980392\" stroke=\"#000000\" d=\"M1605.5489,-250C1605.5489,-250 1480.3574,-250 1480.3574,-250 1474.3574,-250 1468.3574,-244 1468.3574,-238 1468.3574,-238 1468.3574,-198 1468.3574,-198 1468.3574,-192 1474.3574,-186 1480.3574,-186 1480.3574,-186 1605.5489,-186 1605.5489,-186 1611.5489,-186 1617.5489,-192 1617.5489,-198 1617.5489,-198 1617.5489,-238 1617.5489,-238 1617.5489,-244 1611.5489,-250 1605.5489,-250\"/>\n",
       "<text text-anchor=\"middle\" x=\"1542.9531\" y=\"-234.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\" fill=\"#000000\">Fjob_at_home &lt;= 0.5</text>\n",
       "<text text-anchor=\"middle\" x=\"1542.9531\" y=\"-220.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\" fill=\"#000000\">samples = 10.0%</text>\n",
       "<text text-anchor=\"middle\" x=\"1542.9531\" y=\"-206.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\" fill=\"#000000\">value = [0.98, 0.02]</text>\n",
       "<text text-anchor=\"middle\" x=\"1542.9531\" y=\"-192.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\" fill=\"#000000\">class = fail</text>\n",
       "</g>\n",
       "<!-- 25&#45;&gt;26 -->\n",
       "<g id=\"edge26\" class=\"edge\">\n",
       "<title>25&#45;&gt;26</title>\n",
       "<path fill=\"none\" stroke=\"#000000\" d=\"M1542.9531,-285.8089C1542.9531,-277.6906 1542.9531,-268.8517 1542.9531,-260.3186\"/>\n",
       "<polygon fill=\"#000000\" stroke=\"#000000\" points=\"1546.4532,-260.1307 1542.9531,-250.1308 1539.4532,-260.1308 1546.4532,-260.1307\"/>\n",
       "</g>\n",
       "<!-- 31 -->\n",
       "<g id=\"node32\" class=\"node\">\n",
       "<title>31</title>\n",
       "<path fill=\"#e58139\" fill-opacity=\"0.807843\" stroke=\"#000000\" d=\"M1824.9325,-250C1824.9325,-250 1712.9738,-250 1712.9738,-250 1706.9738,-250 1700.9738,-244 1700.9738,-238 1700.9738,-238 1700.9738,-198 1700.9738,-198 1700.9738,-192 1706.9738,-186 1712.9738,-186 1712.9738,-186 1824.9325,-186 1824.9325,-186 1830.9325,-186 1836.9325,-192 1836.9325,-198 1836.9325,-198 1836.9325,-238 1836.9325,-238 1836.9325,-244 1830.9325,-250 1824.9325,-250\"/>\n",
       "<text text-anchor=\"middle\" x=\"1768.9531\" y=\"-234.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\" fill=\"#000000\">health &lt;= 3.5</text>\n",
       "<text text-anchor=\"middle\" x=\"1768.9531\" y=\"-220.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\" fill=\"#000000\">samples = 5.0%</text>\n",
       "<text text-anchor=\"middle\" x=\"1768.9531\" y=\"-206.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\" fill=\"#000000\">value = [0.84, 0.16]</text>\n",
       "<text text-anchor=\"middle\" x=\"1768.9531\" y=\"-192.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\" fill=\"#000000\">class = fail</text>\n",
       "</g>\n",
       "<!-- 25&#45;&gt;31 -->\n",
       "<g id=\"edge31\" class=\"edge\">\n",
       "<title>25&#45;&gt;31</title>\n",
       "<path fill=\"none\" stroke=\"#000000\" d=\"M1615.3935,-285.9467C1639.7785,-275.1569 1667.0691,-263.0814 1691.8032,-252.1371\"/>\n",
       "<polygon fill=\"#000000\" stroke=\"#000000\" points=\"1693.4177,-255.2501 1701.1463,-248.003 1690.5852,-248.8488 1693.4177,-255.2501\"/>\n",
       "</g>\n",
       "<!-- 27 -->\n",
       "<g id=\"node28\" class=\"node\">\n",
       "<title>27</title>\n",
       "<path fill=\"#e58139\" stroke=\"#000000\" d=\"M1524.8594,-143C1524.8594,-143 1429.0468,-143 1429.0468,-143 1423.0468,-143 1417.0468,-137 1417.0468,-131 1417.0468,-131 1417.0468,-105 1417.0468,-105 1417.0468,-99 1423.0468,-93 1429.0468,-93 1429.0468,-93 1524.8594,-93 1524.8594,-93 1530.8594,-93 1536.8594,-99 1536.8594,-105 1536.8594,-105 1536.8594,-131 1536.8594,-131 1536.8594,-137 1530.8594,-143 1524.8594,-143\"/>\n",
       "<text text-anchor=\"middle\" x=\"1476.9531\" y=\"-127.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\" fill=\"#000000\">samples = 9.2%</text>\n",
       "<text text-anchor=\"middle\" x=\"1476.9531\" y=\"-113.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\" fill=\"#000000\">value = [1.0, 0.0]</text>\n",
       "<text text-anchor=\"middle\" x=\"1476.9531\" y=\"-99.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\" fill=\"#000000\">class = fail</text>\n",
       "</g>\n",
       "<!-- 26&#45;&gt;27 -->\n",
       "<g id=\"edge27\" class=\"edge\">\n",
       "<title>26&#45;&gt;27</title>\n",
       "<path fill=\"none\" stroke=\"#000000\" d=\"M1521.707,-185.8089C1514.5113,-174.9063 1506.4578,-162.7041 1499.1873,-151.6882\"/>\n",
       "<polygon fill=\"#000000\" stroke=\"#000000\" points=\"1501.9854,-149.5737 1493.5558,-143.1555 1496.1431,-153.4296 1501.9854,-149.5737\"/>\n",
       "</g>\n",
       "<!-- 28 -->\n",
       "<g id=\"node29\" class=\"node\">\n",
       "<title>28</title>\n",
       "<path fill=\"#e58139\" fill-opacity=\"0.666667\" stroke=\"#000000\" d=\"M1678.9325,-150C1678.9325,-150 1566.9738,-150 1566.9738,-150 1560.9738,-150 1554.9738,-144 1554.9738,-138 1554.9738,-138 1554.9738,-98 1554.9738,-98 1554.9738,-92 1560.9738,-86 1566.9738,-86 1566.9738,-86 1678.9325,-86 1678.9325,-86 1684.9325,-86 1690.9325,-92 1690.9325,-98 1690.9325,-98 1690.9325,-138 1690.9325,-138 1690.9325,-144 1684.9325,-150 1678.9325,-150\"/>\n",
       "<text text-anchor=\"middle\" x=\"1622.9531\" y=\"-134.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\" fill=\"#000000\">paid_no &lt;= 0.5</text>\n",
       "<text text-anchor=\"middle\" x=\"1622.9531\" y=\"-120.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\" fill=\"#000000\">samples = 0.8%</text>\n",
       "<text text-anchor=\"middle\" x=\"1622.9531\" y=\"-106.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\" fill=\"#000000\">value = [0.75, 0.25]</text>\n",
       "<text text-anchor=\"middle\" x=\"1622.9531\" y=\"-92.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\" fill=\"#000000\">class = fail</text>\n",
       "</g>\n",
       "<!-- 26&#45;&gt;28 -->\n",
       "<g id=\"edge28\" class=\"edge\">\n",
       "<title>26&#45;&gt;28</title>\n",
       "<path fill=\"none\" stroke=\"#000000\" d=\"M1568.706,-185.8089C1575.7716,-176.9769 1583.5195,-167.2921 1590.8924,-158.0759\"/>\n",
       "<polygon fill=\"#000000\" stroke=\"#000000\" points=\"1593.7346,-160.1259 1597.2485,-150.1308 1588.2685,-155.753 1593.7346,-160.1259\"/>\n",
       "</g>\n",
       "<!-- 29 -->\n",
       "<g id=\"node30\" class=\"node\">\n",
       "<title>29</title>\n",
       "<path fill=\"#399de5\" stroke=\"#000000\" d=\"M1670.8594,-50C1670.8594,-50 1575.0468,-50 1575.0468,-50 1569.0468,-50 1563.0468,-44 1563.0468,-38 1563.0468,-38 1563.0468,-12 1563.0468,-12 1563.0468,-6 1569.0468,0 1575.0468,0 1575.0468,0 1670.8594,0 1670.8594,0 1676.8594,0 1682.8594,-6 1682.8594,-12 1682.8594,-12 1682.8594,-38 1682.8594,-38 1682.8594,-44 1676.8594,-50 1670.8594,-50\"/>\n",
       "<text text-anchor=\"middle\" x=\"1622.9531\" y=\"-34.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\" fill=\"#000000\">samples = 0.2%</text>\n",
       "<text text-anchor=\"middle\" x=\"1622.9531\" y=\"-20.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\" fill=\"#000000\">value = [0.0, 1.0]</text>\n",
       "<text text-anchor=\"middle\" x=\"1622.9531\" y=\"-6.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\" fill=\"#000000\">class = pass</text>\n",
       "</g>\n",
       "<!-- 28&#45;&gt;29 -->\n",
       "<g id=\"edge29\" class=\"edge\">\n",
       "<title>28&#45;&gt;29</title>\n",
       "<path fill=\"none\" stroke=\"#000000\" d=\"M1622.9531,-85.9947C1622.9531,-77.6273 1622.9531,-68.5643 1622.9531,-60.0478\"/>\n",
       "<polygon fill=\"#000000\" stroke=\"#000000\" points=\"1626.4532,-60.014 1622.9531,-50.014 1619.4532,-60.0141 1626.4532,-60.014\"/>\n",
       "</g>\n",
       "<!-- 30 -->\n",
       "<g id=\"node31\" class=\"node\">\n",
       "<title>30</title>\n",
       "<path fill=\"#e58139\" stroke=\"#000000\" d=\"M1808.8594,-50C1808.8594,-50 1713.0468,-50 1713.0468,-50 1707.0468,-50 1701.0468,-44 1701.0468,-38 1701.0468,-38 1701.0468,-12 1701.0468,-12 1701.0468,-6 1707.0468,0 1713.0468,0 1713.0468,0 1808.8594,0 1808.8594,0 1814.8594,0 1820.8594,-6 1820.8594,-12 1820.8594,-12 1820.8594,-38 1820.8594,-38 1820.8594,-44 1814.8594,-50 1808.8594,-50\"/>\n",
       "<text text-anchor=\"middle\" x=\"1760.9531\" y=\"-34.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\" fill=\"#000000\">samples = 0.6%</text>\n",
       "<text text-anchor=\"middle\" x=\"1760.9531\" y=\"-20.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\" fill=\"#000000\">value = [1.0, 0.0]</text>\n",
       "<text text-anchor=\"middle\" x=\"1760.9531\" y=\"-6.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\" fill=\"#000000\">class = fail</text>\n",
       "</g>\n",
       "<!-- 28&#45;&gt;30 -->\n",
       "<g id=\"edge30\" class=\"edge\">\n",
       "<title>28&#45;&gt;30</title>\n",
       "<path fill=\"none\" stroke=\"#000000\" d=\"M1670.4449,-85.9947C1685.044,-76.1562 1701.0704,-65.3558 1715.5274,-55.613\"/>\n",
       "<polygon fill=\"#000000\" stroke=\"#000000\" points=\"1717.4989,-58.505 1723.8355,-50.014 1713.5868,-52.7002 1717.4989,-58.505\"/>\n",
       "</g>\n",
       "<!-- 32 -->\n",
       "<g id=\"node33\" class=\"node\">\n",
       "<title>32</title>\n",
       "<path fill=\"#e58139\" stroke=\"#000000\" d=\"M1816.8594,-143C1816.8594,-143 1721.0468,-143 1721.0468,-143 1715.0468,-143 1709.0468,-137 1709.0468,-131 1709.0468,-131 1709.0468,-105 1709.0468,-105 1709.0468,-99 1715.0468,-93 1721.0468,-93 1721.0468,-93 1816.8594,-93 1816.8594,-93 1822.8594,-93 1828.8594,-99 1828.8594,-105 1828.8594,-105 1828.8594,-131 1828.8594,-131 1828.8594,-137 1822.8594,-143 1816.8594,-143\"/>\n",
       "<text text-anchor=\"middle\" x=\"1768.9531\" y=\"-127.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\" fill=\"#000000\">samples = 2.2%</text>\n",
       "<text text-anchor=\"middle\" x=\"1768.9531\" y=\"-113.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\" fill=\"#000000\">value = [1.0, 0.0]</text>\n",
       "<text text-anchor=\"middle\" x=\"1768.9531\" y=\"-99.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\" fill=\"#000000\">class = fail</text>\n",
       "</g>\n",
       "<!-- 31&#45;&gt;32 -->\n",
       "<g id=\"edge32\" class=\"edge\">\n",
       "<title>31&#45;&gt;32</title>\n",
       "<path fill=\"none\" stroke=\"#000000\" d=\"M1768.9531,-185.8089C1768.9531,-175.446 1768.9531,-163.909 1768.9531,-153.3327\"/>\n",
       "<polygon fill=\"#000000\" stroke=\"#000000\" points=\"1772.4532,-153.1555 1768.9531,-143.1555 1765.4532,-153.1556 1772.4532,-153.1555\"/>\n",
       "</g>\n",
       "<!-- 33 -->\n",
       "<g id=\"node34\" class=\"node\">\n",
       "<title>33</title>\n",
       "<path fill=\"#e58139\" fill-opacity=\"0.600000\" stroke=\"#000000\" d=\"M1988.7316,-150C1988.7316,-150 1859.1746,-150 1859.1746,-150 1853.1746,-150 1847.1746,-144 1847.1746,-138 1847.1746,-138 1847.1746,-98 1847.1746,-98 1847.1746,-92 1853.1746,-86 1859.1746,-86 1859.1746,-86 1988.7316,-86 1988.7316,-86 1994.7316,-86 2000.7316,-92 2000.7316,-98 2000.7316,-98 2000.7316,-138 2000.7316,-138 2000.7316,-144 1994.7316,-150 1988.7316,-150\"/>\n",
       "<text text-anchor=\"middle\" x=\"1923.9531\" y=\"-134.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\" fill=\"#000000\">guardian_other &lt;= 0.5</text>\n",
       "<text text-anchor=\"middle\" x=\"1923.9531\" y=\"-120.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\" fill=\"#000000\">samples = 2.8%</text>\n",
       "<text text-anchor=\"middle\" x=\"1923.9531\" y=\"-106.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\" fill=\"#000000\">value = [0.714, 0.286]</text>\n",
       "<text text-anchor=\"middle\" x=\"1923.9531\" y=\"-92.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\" fill=\"#000000\">class = fail</text>\n",
       "</g>\n",
       "<!-- 31&#45;&gt;33 -->\n",
       "<g id=\"edge33\" class=\"edge\">\n",
       "<title>31&#45;&gt;33</title>\n",
       "<path fill=\"none\" stroke=\"#000000\" d=\"M1818.8493,-185.8089C1833.7835,-176.174 1850.2907,-165.5241 1865.7118,-155.575\"/>\n",
       "<polygon fill=\"#000000\" stroke=\"#000000\" points=\"1867.6449,-158.4931 1874.1504,-150.1308 1863.85,-152.611 1867.6449,-158.4931\"/>\n",
       "</g>\n",
       "<!-- 34 -->\n",
       "<g id=\"node35\" class=\"node\">\n",
       "<title>34</title>\n",
       "<path fill=\"#e58139\" fill-opacity=\"0.800000\" stroke=\"#000000\" d=\"M1982.5039,-50C1982.5039,-50 1855.4023,-50 1855.4023,-50 1849.4023,-50 1843.4023,-44 1843.4023,-38 1843.4023,-38 1843.4023,-12 1843.4023,-12 1843.4023,-6 1849.4023,0 1855.4023,0 1855.4023,0 1982.5039,0 1982.5039,0 1988.5039,0 1994.5039,-6 1994.5039,-12 1994.5039,-12 1994.5039,-38 1994.5039,-38 1994.5039,-44 1988.5039,-50 1982.5039,-50\"/>\n",
       "<text text-anchor=\"middle\" x=\"1918.9531\" y=\"-34.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\" fill=\"#000000\">samples = 2.4%</text>\n",
       "<text text-anchor=\"middle\" x=\"1918.9531\" y=\"-20.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\" fill=\"#000000\">value = [0.833, 0.167]</text>\n",
       "<text text-anchor=\"middle\" x=\"1918.9531\" y=\"-6.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\" fill=\"#000000\">class = fail</text>\n",
       "</g>\n",
       "<!-- 33&#45;&gt;34 -->\n",
       "<g id=\"edge34\" class=\"edge\">\n",
       "<title>33&#45;&gt;34</title>\n",
       "<path fill=\"none\" stroke=\"#000000\" d=\"M1922.2324,-85.9947C1921.7826,-77.6273 1921.2953,-68.5643 1920.8374,-60.0478\"/>\n",
       "<polygon fill=\"#000000\" stroke=\"#000000\" points=\"1924.3299,-59.8117 1920.298,-50.014 1917.34,-60.1875 1924.3299,-59.8117\"/>\n",
       "</g>\n",
       "<!-- 35 -->\n",
       "<g id=\"node36\" class=\"node\">\n",
       "<title>35</title>\n",
       "<path fill=\"#399de5\" stroke=\"#000000\" d=\"M2119.8594,-50C2119.8594,-50 2024.0468,-50 2024.0468,-50 2018.0468,-50 2012.0468,-44 2012.0468,-38 2012.0468,-38 2012.0468,-12 2012.0468,-12 2012.0468,-6 2018.0468,0 2024.0468,0 2024.0468,0 2119.8594,0 2119.8594,0 2125.8594,0 2131.8594,-6 2131.8594,-12 2131.8594,-12 2131.8594,-38 2131.8594,-38 2131.8594,-44 2125.8594,-50 2119.8594,-50\"/>\n",
       "<text text-anchor=\"middle\" x=\"2071.9531\" y=\"-34.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\" fill=\"#000000\">samples = 0.4%</text>\n",
       "<text text-anchor=\"middle\" x=\"2071.9531\" y=\"-20.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\" fill=\"#000000\">value = [0.0, 1.0]</text>\n",
       "<text text-anchor=\"middle\" x=\"2071.9531\" y=\"-6.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\" fill=\"#000000\">class = pass</text>\n",
       "</g>\n",
       "<!-- 33&#45;&gt;35 -->\n",
       "<g id=\"edge35\" class=\"edge\">\n",
       "<title>33&#45;&gt;35</title>\n",
       "<path fill=\"none\" stroke=\"#000000\" d=\"M1974.8863,-85.9947C1990.6897,-76.0642 2008.0525,-65.1538 2023.67,-55.3401\"/>\n",
       "<polygon fill=\"#000000\" stroke=\"#000000\" points=\"2025.5409,-58.2981 2032.1458,-50.014 2021.8165,-52.3711 2025.5409,-58.2981\"/>\n",
       "</g>\n",
       "</g>\n",
       "</svg>\n"
      ],
      "text/plain": [
       "<graphviz.files.Source at 0x10e5c4630>"
      ]
     },
     "execution_count": 6,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# visualize tree\n",
    "import graphviz\n",
    "dot_data = tree.export_graphviz(t, out_file=None, label=\"all\", impurity=False, proportion=True,\n",
    "                                feature_names=list(d_train_att), class_names=[\"fail\", \"pass\"], \n",
    "                                filled=True, rounded=True)\n",
    "graph = graphviz.Source(dot_data)\n",
    "graph"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 7,
   "metadata": {},
   "outputs": [],
   "source": [
    "# save tree\n",
    "tree.export_graphviz(t, out_file=\"student-performance.dot\", label=\"all\", impurity=False, proportion=True,\n",
    "                     feature_names=list(d_train_att), class_names=[\"fail\", \"pass\"], \n",
    "                     filled=True, rounded=True)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 8,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "0.59731543624161076"
      ]
     },
     "execution_count": 8,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "t.score(d_test_att, d_test_pass)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 9,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Accuracy: 0.67 (+/- 0.06)\n"
     ]
    }
   ],
   "source": [
    "from sklearn.model_selection import cross_val_score\n",
    "scores = cross_val_score(t, d_att, d_pass, cv=5)\n",
    "# show average score and +/- two standard deviations away (covering 95% of scores)\n",
    "print(\"Accuracy: %0.2f (+/- %0.2f)\" % (scores.mean(), scores.std() * 2))"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 10,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Max depth: 1, Accuracy: 0.64 (+/- 0.05)\n",
      "Max depth: 2, Accuracy: 0.69 (+/- 0.08)\n",
      "Max depth: 3, Accuracy: 0.69 (+/- 0.09)\n",
      "Max depth: 4, Accuracy: 0.66 (+/- 0.10)\n",
      "Max depth: 5, Accuracy: 0.67 (+/- 0.06)\n",
      "Max depth: 6, Accuracy: 0.64 (+/- 0.08)\n",
      "Max depth: 7, Accuracy: 0.67 (+/- 0.02)\n",
      "Max depth: 8, Accuracy: 0.67 (+/- 0.07)\n",
      "Max depth: 9, Accuracy: 0.67 (+/- 0.06)\n",
      "Max depth: 10, Accuracy: 0.63 (+/- 0.12)\n",
      "Max depth: 11, Accuracy: 0.65 (+/- 0.07)\n",
      "Max depth: 12, Accuracy: 0.63 (+/- 0.07)\n",
      "Max depth: 13, Accuracy: 0.63 (+/- 0.07)\n",
      "Max depth: 14, Accuracy: 0.63 (+/- 0.08)\n",
      "Max depth: 15, Accuracy: 0.64 (+/- 0.06)\n",
      "Max depth: 16, Accuracy: 0.62 (+/- 0.05)\n",
      "Max depth: 17, Accuracy: 0.64 (+/- 0.09)\n",
      "Max depth: 18, Accuracy: 0.63 (+/- 0.08)\n",
      "Max depth: 19, Accuracy: 0.63 (+/- 0.06)\n"
     ]
    }
   ],
   "source": [
    "for max_depth in range(1, 20):\n",
    "    t = tree.DecisionTreeClassifier(criterion=\"entropy\", max_depth=max_depth)\n",
    "    scores = cross_val_score(t, d_att, d_pass, cv=5)\n",
    "    print(\"Max depth: %d, Accuracy: %0.2f (+/- %0.2f)\" % (max_depth, scores.mean(), scores.std() * 2))"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 11,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([[  1.        ,   0.63790456,   0.04848398],\n",
       "       [  2.        ,   0.68559869,   0.07148267],\n",
       "       [  3.        ,   0.68710174,   0.0865951 ],\n",
       "       [  4.        ,   0.6669467 ,   0.10726248],\n",
       "       [  5.        ,   0.66261518,   0.05307124],\n",
       "       [  6.        ,   0.65018859,   0.07040891],\n",
       "       [  7.        ,   0.66564494,   0.02029519],\n",
       "       [  8.        ,   0.67474598,   0.05984916],\n",
       "       [  9.        ,   0.6640118 ,   0.03746891],\n",
       "       [ 10.        ,   0.6346137 ,   0.09657669],\n",
       "       [ 11.        ,   0.6484015 ,   0.10475147],\n",
       "       [ 12.        ,   0.64545485,   0.05529647],\n",
       "       [ 13.        ,   0.64544256,   0.08167465],\n",
       "       [ 14.        ,   0.6346614 ,   0.07458128],\n",
       "       [ 15.        ,   0.63463773,   0.08162646],\n",
       "       [ 16.        ,   0.62853141,   0.05926906],\n",
       "       [ 17.        ,   0.63622335,   0.05390067],\n",
       "       [ 18.        ,   0.62548936,   0.06050112],\n",
       "       [ 19.        ,   0.63004547,   0.07022296]])"
      ]
     },
     "execution_count": 11,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "depth_acc = np.empty((19,3), float)\n",
    "i = 0\n",
    "for max_depth in range(1, 20):\n",
    "    t = tree.DecisionTreeClassifier(criterion=\"entropy\", max_depth=max_depth)\n",
    "    scores = cross_val_score(t, d_att, d_pass, cv=5)\n",
    "    depth_acc[i,0] = max_depth\n",
    "    depth_acc[i,1] = scores.mean()\n",
    "    depth_acc[i,2] = scores.std() * 2\n",
    "    i += 1\n",
    "    \n",
    "depth_acc"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 12,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGg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ex7Y6Jx7vJo2bf3tMLMh+Nbn/vqrEswsycyanbqPb6fe+krNZgM3\n+EfxXAQcDOi2qG/VbjlFwvqsZDZwajTOFOC9KtrMA8aaWYq/u2Ksf1q9MbPxwH3Alc65kmraBPM+\nqVOV9iN9r5rXXwFkmVmm/1vhJHx/h3AYDXzpnMuvamYkrNOzEu49yZF6A0bg+zq/Dljjv10O3Abc\n5m9zO7AB3wiDpcCwMNTZxf/6a/21/No/PbBOA6bhGxXxBTAoTOs0CV+ItwiYFhHrE98H0S7gJL5+\n5FuAVsCHwGZgAdDS33YQ8FzAsjcDuf7bTWGoMxdfP/ip9+n/+tu2B+ae6X1Sz3W+7H//rcMX5O0q\n1+l/fDm+0XJb6rrO6mr1T3/x1HszoG3Y1mmobjoiV0TEQ9S9IyLiIQp9EREPUeiLiHiIQl9ExEMU\n+iIiHqLQFxHxEIW+iIiHKPRFRDzk/wNlqKa3/3voUAAAAABJRU5ErkJggg==\n",
      "text/plain": [
       "<matplotlib.figure.Figure at 0x10ee94588>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "import matplotlib.pyplot as plt\n",
    "fig, ax = plt.subplots()\n",
    "ax.errorbar(depth_acc[:,0], depth_acc[:,1], yerr=depth_acc[:,2])\n",
    "plt.show()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.6.2"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
